﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Database.Model.Customers>" %>

<%@ Import Namespace="CRM.Database.Model" %>
<%@ Import Namespace="CRM.Resourses" %>


<% Html.DevExpress().GridView(settings =>
                                    {
                                        settings.Name = "gdTransportContidions";
                                        settings.KeyFieldName = "IdTransportCondition";
                                        settings.CallbackRouteValues =
                                            new { Controller = "Contracts", Action = "CustomerTransportConditionsPartial", customerId = Model.IdCustomer };
                                        settings.SettingsPager.PageSize = 20;
                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.LegalEntityName;
                                            column.FieldName = "LegalEntityName";

                                           
                                        });
                                        settings.Columns.Add(column =>
                                                                 {
                                                                     column.Caption = Resourses.InternalCourse;
                                                                     column.FieldName = "InternalCourse";
                                                                 });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.TrucksCapacities;
                                            column.FieldName = "TrucksCapacities.Capacity";
                                        });
                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.Unit;
                                            column.FieldName = "Unit";

                                            
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.TransportationCostRURwithVAT;
                                            column.FieldName = "TransportationCostRURwithVATStr";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.TransportationCostRURwithoutVAT;
                                            column.FieldName = "TransportationCostRURwithoutVATStr";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.TransportationCostEURwithoutVAT;
                                            column.FieldName = "TransportationCostEURwithoutVATStr";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.PallettTransportationCost;
                                            column.FieldName = "PallettTransportationCostStr";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.Comments;
                                            column.FieldName = "Comments";
                                        });



                                        settings.Width = Unit.Percentage(100);

                                     
                                    }).Bind(Model.TransportConditions).GetHtml();
                                    
                                    
                                    %>